//
//  LZStaffInfoViewController.m
//  laziz_Merchant
//
//  Created by xbnzd on 17/3/17.
//  Copyright © 2017年 XBN. All rights reserved.
//

#import "LZStaffInfoViewController.h"
#import "LZMyChangeInfoViewController.h"
#import "UIView+Rotation.h"
#import "AppDelegate.h"
#import "LZUserModel.h"

@interface LZStaffInfoViewController ()
@property (weak, nonatomic) IBOutlet UILabel *leftLabel;
@property (weak, nonatomic) IBOutlet UIImageView *arrowImg;
@property (weak, nonatomic) IBOutlet UILabel *rightLabel;
@property (weak, nonatomic) IBOutlet UIButton *quitBtn;

@end

@implementation LZStaffInfoViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self configureUI];
}


#pragma mark - UI
- (void)configureUI
{
    self.umLogPageViewName = @"员工个人中心";
    self.title = LZLocalizedString(@"personal_info", nil);
    self.leftLabel.text = LZLocalizedString(@"password", nil);
    self.rightLabel.text = LZLocalizedString(@"change_setting", nil);
    self.view.backgroundColor = UIColorFromRGB(0xeeeeee, 1);
    
    [self.arrowImg setLanguageRotaion];
    
    self.quitBtn.layer.cornerRadius = 20.;
    self.quitBtn.layer.masksToBounds = YES;
    [self.quitBtn setTitle:LZLocalizedString(@"quit", nil) forState:UIControlStateNormal];
}

- (IBAction)btnAction:(id)sender {
    
    LZMyChangeInfoViewController *vc = [[LZMyChangeInfoViewController alloc] init];
    vc.type = LZ_MYCHANGEINFO_TYPE_CHANGEPASSWORD;
    
    [self.navigationController pushViewController:vc animated:YES];
}

- (IBAction)quitBtnAction:(id)sender {
    
    [[LZUserModel Instance] logOut];
    
    [self.navigationController popToRootViewControllerAnimated:YES];
    
    AppDelegate *appDelegate = (AppDelegate*)[UIApplication sharedApplication].delegate;
    [appDelegate setRootForLoginVCWithIsShowLeadingView:NO];

}

@end
